package com.tengju.user.domain.model.archive.letax;

import com.tengju.user.domain.model.user.UserIdCode;
import com.tengju.user.domain.shared.AESUtil;
import lombok.Value;
import lombok.experimental.NonFinal;

@Value
public class LetaxSnapshot {

    private static final String AES_SEED = "DcServic";

    private LetaxSnapshotId letaxSnapshotId;

    private UserIdCode idCode;
    private String merchantId;
    private String merchantName;
    private String merchantTaxNumber;
    private String licenseUrl;
    private String licenseCopyUrl;
    @NonFinal
    private String name;
    @NonFinal
    private String idCardNo;
    @NonFinal
    private String phoneNumber;
    @NonFinal
    private String email;
    private String politicalAppearance;
    private String degreeEducation;
    private String stateCode;
    private String rejectType;
    private String rejectReason;
    private String ifFaceAuthenticate;
    private String openingDate;
    @NonFinal
    private LetaxAccountId registeredId;


//    public void decrypt(String name, String idCardNo, String phoneNumber, String email, LetaxAccountId letaxAccountId) {
//        this.name = AESUtil.decryptDES(AES_SEED, name);
//        this.idCardNo = (AESUtil.decryptDES(AES_SEED, idCardNo));
//        this.phoneNumber = (AESUtil.decryptDES(AES_SEED, phoneNumber));
//        this.email = (AESUtil.decryptDES(AES_SEED, email));
//        this.registeredId = letaxAccountId;
//    }


    public void updateIdCardNo(String idCardNo) {
        this.idCardNo = idCardNo;
    }
}
